package com.xydtech.ecard.config.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xydtech.ecard.config.mapper.EcardServeModuleNewsMapper;
import com.xydtech.ecard.config.domain.EcardServeModuleNews;
import com.xydtech.ecard.config.service.IEcardServeModuleNewsService;
import com.xydtech.common.core.text.Convert;

/**
 * 服务模块内部新闻Service业务层处理
 * 
 * @author JHON
 * @date 2022-06-23
 */
@Service
public class EcardServeModuleNewsServiceImpl implements IEcardServeModuleNewsService 
{
    @Autowired
    private EcardServeModuleNewsMapper ecardServeModuleNewsMapper;

    /**
     * 查询服务模块内部新闻
     * 
     * @param id 服务模块内部新闻主键
     * @return 服务模块内部新闻
     */
    @Override
    public EcardServeModuleNews selectEcardServeModuleNewsById(Long id)
    {
        return ecardServeModuleNewsMapper.selectEcardServeModuleNewsById(id);
    }

    /**
     * 查询服务模块内部新闻列表
     * 
     * @param ecardServeModuleNews 服务模块内部新闻
     * @return 服务模块内部新闻
     */
    @Override
    public List<EcardServeModuleNews> selectEcardServeModuleNewsList(EcardServeModuleNews ecardServeModuleNews)
    {
        return ecardServeModuleNewsMapper.selectEcardServeModuleNewsList(ecardServeModuleNews);
    }

    /**
     * 新增服务模块内部新闻
     * 
     * @param ecardServeModuleNews 服务模块内部新闻
     * @return 结果
     */
    @Override
    public int insertEcardServeModuleNews(EcardServeModuleNews ecardServeModuleNews)
    {
        return ecardServeModuleNewsMapper.insertEcardServeModuleNews(ecardServeModuleNews);
    }

    /**
     * 修改服务模块内部新闻
     * 
     * @param ecardServeModuleNews 服务模块内部新闻
     * @return 结果
     */
    @Override
    public int updateEcardServeModuleNews(EcardServeModuleNews ecardServeModuleNews)
    {
        return ecardServeModuleNewsMapper.updateEcardServeModuleNews(ecardServeModuleNews);
    }

    /**
     * 批量删除服务模块内部新闻
     * 
     * @param ids 需要删除的服务模块内部新闻主键
     * @return 结果
     */
    @Override
    public int deleteEcardServeModuleNewsByIds(String ids)
    {
        return ecardServeModuleNewsMapper.deleteEcardServeModuleNewsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除服务模块内部新闻信息
     * 
     * @param id 服务模块内部新闻主键
     * @return 结果
     */
    @Override
    public int deleteEcardServeModuleNewsById(Long id)
    {
        return ecardServeModuleNewsMapper.deleteEcardServeModuleNewsById(id);
    }
}
